import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.Date;

import javax.swing.Timer;

import com.sun.corba.se.spi.orbutil.fsm.Action;

/**
 * @author    Paolo Gabrielli
 * @version   1.0
 * @copyWrith 2008
 */

class MioThread implements ActionListener{
	
	private String string = new String();
	private Graphic graphic;
	
	public MioThread(Graphic g) {
		this.graphic = g;
	}
	
	public void start() {
		Timer t = new Timer(1000 , new MioThread(new Graphic()));
		t.start();
	}
	
	public void setText(String string) {
		this.string = string;
	}
	
	public String getString() {
		return this.string;
	}
	
	public void actionPerformed(ActionEvent event){ 
		String a = new String("" + (new Date()).getSeconds());
		this.graphic.setTextField(this.getString());
		}

}